nethackfandomcom-20200214-history
Source:NetHack 2.3e/decl.c
Below is the full text to decl.c from the source code of NetHack 2.3e. To link to a particular line, write [[NetHack 2.3e/decl.c#line123]], for example. Warning! This is the source code from an old release. For the latest release, see Source code 1. /* SCCS Id: @(#)decl.c 2.3 87/12/16 2. /* Copyright © Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3. 4. #include "hack.h" 5. char nul40; /* contains zeros */ 6. char plnamePL_NSIZ; /* player name */ 7. 8. #ifdef GRAPHICS 9. struct symbols defsyms = { 10. ' ', '|', '-', '-', '-', '-', '-', '+', '.', '#', '<', '>', '^', 11. # ifdef FOUNTAINS 12. '}', '{', 13. # endif 14. # ifdef NEWCLASS 15. '\\', 16. # endif 17. # ifdef SPIDERS 18. '"', 19. # endif 20. #ifdef SINKS 21. '#', 22. #endif 23. }; 24. 25. struct symbols showsyms; /* will contain the symbols actually used */ 26. 27. #endif /* GRAPHICS /**/ 28. 29. #ifdef DGK 30. char hackdirPATHLEN; /* where rumors, help, record are */ 31. char levelsPATHLEN; /* where levels are */ 32. char lockFILENAME; /* pathname of level files */ 33. char permbonesPATHLEN; /* where permanent copy of bones go */ 34. int ramdisk = FALSE; /* whether to copy bones to levels or not */ 35. int saveprompt = TRUE; 36. char *alllevels = "levels.*"; 37. char *allbones = "bones.*"; 38. char *configfile = "NetHack.cnf"; /* read by read_config_file() */ 39. #else 40. char lockPL_NSIZ+4 = "1lock"; /* long enough for login name .99 */ 41. #endif 42. 43. boolean in_mklev, restoring; 44. struct rm levlCOLNOROWNO; /* level map */ 45. 46. #ifndef QUEST 47. #include "mkroom.h" 48. struct mkroom roomsMAXNROFROOMS+1; 49. coord doorsDOORMAX; 50. #endif 51. 52. struct monst *fmon = 0; 53. struct trap *ftrap = 0; 54. struct gold *fgold = 0; 55. struct obj *fobj = 0, *fcobj = 0, *invent = 0, *uwep = 0, *uarm = 0, 56. #ifdef SHIRT 57. *uarmu = 0, /* under-wear, so to speak */ 58. #endif 59. *uarm2 = 0, *uarmh = 0, *uarms = 0, *uarmg = 0, *uright = 0, 60. *uleft = 0, *uchain = 0, *uball = 0; 61. struct flag flags; 62. struct you u; 63. 64. #ifdef SPELLS 65. struct spell spl_book+ 1; 66. #endif 67. 68. struct monst youmonst; /* dummy; used as return value for boomhit */ 69. 70. xchar dlevel = 1; 71. xchar xupstair, yupstair, xdnstair, ydnstair; 72. char *save_cm = 0, *killer, *nomovemsg; 73. 74. long moves = 1; 75. long wailmsg = 0; 76. int multi = 0; 77. char *occtxt; 78. #ifdef DGKMOD 79. int occtime; 80. #endif 81. #ifdef REDO 82. int in_doagain = FALSE; 83. #endif 84. 85. char *HI, *HE; /* set up in termcap.c */ 86. #ifdef MSDOSCOLOR 87. char *HI_MON, *HI_OBJ; /* set up in termcap.c */ 88. #endif 89. 90. char genocided60; 91. char fut_geno60; 92. #ifdef KAA 93. boolean stoned; /* done to monsters hit by 'c' */ 94. boolean unweapon; 95. #endif 96. 97. xchar curx,cury; 98. xchar seelx, seehx, seely, seehy; /* corners of lit room */ 99. 100. coord bhitpos; 101. 102. char quitchars[] = " \r\n\033"; decl.c